# sort.py
names = ['jack','mary','tom','dorothy','peter']
# Python中的排序可以用sort()函数实现
names.sort()
print(names)
names.sort(key=len)
print("sort by len:",names)

scores = [82,66,66,93,24,15,77.8]
scores.sort(reverse=True)
print(scores)

# 倒序
# reverse.py
names = ['jack','mary','tom','dorothy','peter']
names.reverse()
print(names)